﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ALDIOrganizer
{
    public static class WeekdayArrayExtensionMethods
    {
        public static Weekday[] Remaining(this Weekday[] pDays)
        {
            var _remaining = new List<Weekday>();
            _remaining.AddRange(Time.AllWeekdays);
            foreach (var _day in pDays)
                _remaining.Remove(_day);
            return _remaining.ToArray();
        }

        public static int ToFlagInt(this Weekday[] pDays)
        {            
            int result = 0;
            foreach (var day in pDays)
            {
                result |= day.AsFlag();
            }
            return result;
        }
    }
}
